<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('uv详情')" />
</head>
<body class="gray-bg">


    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <input type="hidden" id="countId" th:value="${countId}" name="countId">
                    <input type="hidden" th:value="${ctx}" id="ctx" />
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>时间：</label>
                                <input type="text" name="createTime" id="dateInfo"/>
                            </li>

                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
	    $(function () {
            var prefix = $("#ctx").val() + "/extend/uvCountInfo";

            var options = {
                url: prefix + "/list",
                exportUrl: prefix + "/export/",//+$("#countId").val()
                modalName: "uv详情",
                columns: [
                    {
                        field: 'channelCode',
                        title: '渠道编号'
                    },
                    {
                        field: 'channelName',
                        title: '渠道名称'
                    },
                    {
                        field: 'dateInfo',
                        title: '日期'
                    },
                    {
                        field: 'reqIp',
                        title: '请求IP'
                    },
                    {
                        field: 'mobileFlag',
                        title: '是否是手机',
                        formatter: function (value, row, index){
                            return row.mobileFlag == 1?"是":"否";
                        }
                    },
                    {
                        field: 'browserName',
                        title: '浏览器名称'
                    },
                    {
                        field: 'platformName',
                        title: '平台名称'
                    },
                    {
                        field: 'recordFlag',
                        title: '是否记录',
                        formatter: function (value, row, index){
                            return row.recordFlag == 0?"是":"否";
                        }
                    },
                    {
                        field: 'createTime',
                        title: '创建时间'
                    }
                ]
            };
            $.table.init(options);

            layui.use('laydate', function(){
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#dateInfo',
                    type: 'time',
                    range: '~'
                });
            });

	    });
    </script>
</body>
</html>